package com.sz.biz.trade.ord.entity;

import com.sz.common.base.dao.ext.IEnum;

/**
 * Function: 订单类型 <br>
 * Author: jifeixing<br>
 * Date: 2017-05-18 17:03:00
 */
public enum TrdOrderType implements IEnum {

    SALE("1", "销售订单"),
    PURCHASE("2", "采购订单");


    private String code;
    private String name;

    TrdOrderType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }

    public static TrdOrderType valueOfEnum(String code) {
        TrdOrderType[] iss = values();
        for (TrdOrderType cs : iss) {
            if (cs.getCode().equals(code)) {
                return cs;
            }
        }
        return null;
    }
}
